<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html><head><meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
<title>Connection.h File Reference</title>
<link href="doxygen.css" rel="stylesheet" type="text/css">
<link href="tabs.css" rel="stylesheet" type="text/css">
<style type="text/css" media="screen">
    body {background-color:white;}
    body,div,p,dl,.memname, .params, .exception {font: normal normal normal 16px/22px "HelveticaNeue", Helvetica, "Arial Narrow", Arial, sans-serif;}
    #nav-path {display:none;}
    h2:first-of-type {margin-top:2px; border:none;}
    h2.groupheader {font-size:26px; line-height:28px;color:#286796;}
    div.groupheader { font-weight:600; font-size:18px;color: rgb(51, 51, 51);}
    h3 {font-size:20px;color: rgb(51, 51, 51);}
    div.header { background-image:none; background-color: #3b96d7; color:white;}
    div.title {text-align:center;font-size: 28px; font-weight:100;}
    .summary {display:none;}
    dl.section {border:none;}
    .memproto > *, .memitem > * {
            box-shadow: none!important;
            -moz-box-shadow: none!important;
            -webkit-box-shadow: none!important;
            background-image:none!important;
    }
    .memproto {
            border-bottom: 1px #b8c8e9 solid;
            background-color: #f7fcff;
    }
    pre {white-space: pre-wrap;}
    .textinfo {color: #428bca;}
    .textnote {color: #a94442;}
</style>
</head><body>
<!-- Generated by Doxygen 1.8.5 -->
<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_bb61871b4c63e4e6685a8d6c52430594.html">zdb</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="summary">
<a href="#define-members">Macros</a> &#124;
<a href="#typedef-members">Typedefs</a> &#124;
<a href="#func-members">Functions</a>  </div>
  <div class="headertitle">
<div class="title">Connection.h File Reference</div>  </div>
</div><!--header-->
<div class="contents">
<a name="details" id="details"></a><h2 class="groupheader">Detailed Description</h2>
<div class="textblock"><p>A <b>Connection</b> represent a connection to a SQL database system. </p>
<p>Use a Connection to execute SQL statements. There are three ways to execute statements: <a class="el" href="Connection_8h.html#ad7029336959701d33bb921b89bc5b7ef" title="Executes the given SQL statement, which may be an INSERT, UPDATE, or DELETE statement or an SQL state...">Connection_execute()</a> is used to execute SQL statements that does not return a result set. Such statements are INSERT, UPDATE or DELETE. <a class="el" href="Connection_8h.html#a3d1e39204654573ccac3d8ba3a2eae58" title="Executes the given SQL statement, which returns a single ResultSet object. ">Connection_executeQuery()</a> is used to execute a SQL SELECT statement and return a result set. These methods can only handle values which can be expressed as C-strings. If you need to handle binary data, such as inserting a blob value into the database, use a PreparedStatement object to execute the SQL statement. The factory method <a class="el" href="Connection_8h.html#a16dfbbe273d9a872462bed182dec3bb5" title="Creates a PreparedStatement object for sending parameterized SQL statements to the database...">Connection_prepareStatement()</a> is used to obtain a PreparedStatement object.</p>
<p>The method <a class="el" href="Connection_8h.html#a3d1e39204654573ccac3d8ba3a2eae58" title="Executes the given SQL statement, which returns a single ResultSet object. ">Connection_executeQuery()</a> will return an empty ResultSet (not null) if the SQL statement did not return any values. A ResultSet lives until the next call to Connection execute or until the Connection is returned to the Connection Pool. If an error occur during execution, an SQLException is thrown.</p>
<p>Any SQL statement that changes the database (basically, any SQL command other than SELECT) will automatically start a transaction if one is not already in effect. Automatically started transactions are committed at the conclusion of the command.</p>
<p>Transactions can also be started manually using <a class="el" href="Connection_8h.html#ac0ce66b1335330efc625c2b93ca7178a" title="Start a transaction. ">Connection_beginTransaction()</a>. Such transactions usually persist until the next call to <a class="el" href="Connection_8h.html#ac3672ae2a12da6901e53702decb10139" title="Makes all changes made since the previous commit/rollback permanent and releases any database locks c...">Connection_commit()</a> or <a class="el" href="Connection_8h.html#a4bdab7bb14c43834ba231aa511919a79" title="Undoes all changes made in the current transaction and releases any database locks currently held by ...">Connection_rollback()</a>. A transaction will also rollback if the database is closed or if an error occurs. Nested transactions are not allowed.</p>
<p><em>A Connection is reentrant, but not thread-safe and should only be used by one thread (at the time).</em></p>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="ResultSet_8h.html" title="A ResultSet represents a database result set. ">ResultSet.h</a> <a class="el" href="PreparedStatement_8h.html" title="A PreparedStatement represent a single SQL statement pre-compiled into byte code for later execution...">PreparedStatement.h</a> <a class="el" href="SQLException_8h.html" title="Signals that an SQL specific exception has occurred. ">SQLException.h</a> </dd></dl>
</div><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="define-members"></a>
Macros</h2></td></tr>
<tr class="memitem:a0acb682b8260ab1c60b918599864e2e5"><td class="memItemLeft" align="right" valign="top">#define&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="Connection_8h.html#a0acb682b8260ab1c60b918599864e2e5">T</a>&#160;&#160;&#160;Connection_T</td></tr>
<tr class="separator:a0acb682b8260ab1c60b918599864e2e5"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="typedef-members"></a>
Typedefs</h2></td></tr>
<tr class="memitem:a8dc1b239f8e305fbd1406ff041c89151"><td class="memItemLeft" align="right" valign="top">typedef struct Connection_S *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a></td></tr>
<tr class="separator:a8dc1b239f8e305fbd1406ff041c89151"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table><table class="memberdecls">
<tr class="heading"><td colspan="2"><h2 class="groupheader"><a name="func-members"></a>
Functions</h2></td></tr>
<tr class="memitem:ac90958295ec1728f6b990d28fe052ac8"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="Connection_8h.html#ac90958295ec1728f6b990d28fe052ac8">Connection_ping</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> C)</td></tr>
<tr class="memdesc:ac90958295ec1728f6b990d28fe052ac8"><td class="mdescLeft">&#160;</td><td class="mdescRight">Ping the database server and returns true if this Connection is alive, otherwise false in which case the Connection should be closed.  <a href="#ac90958295ec1728f6b990d28fe052ac8">More...</a><br/></td></tr>
<tr class="separator:ac90958295ec1728f6b990d28fe052ac8"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ae0cd7b68e0e3cfd6a1a458af31db25d3"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="Connection_8h.html#ae0cd7b68e0e3cfd6a1a458af31db25d3">Connection_clear</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> C)</td></tr>
<tr class="memdesc:ae0cd7b68e0e3cfd6a1a458af31db25d3"><td class="mdescLeft">&#160;</td><td class="mdescRight">Close any ResultSet and PreparedStatements in the Connection.  <a href="#ae0cd7b68e0e3cfd6a1a458af31db25d3">More...</a><br/></td></tr>
<tr class="separator:ae0cd7b68e0e3cfd6a1a458af31db25d3"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:aac4c939875fb240528435d486b484a7f"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="Connection_8h.html#aac4c939875fb240528435d486b484a7f">Connection_close</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> C)</td></tr>
<tr class="memdesc:aac4c939875fb240528435d486b484a7f"><td class="mdescLeft">&#160;</td><td class="mdescRight">Return connection to the connection pool.  <a href="#aac4c939875fb240528435d486b484a7f">More...</a><br/></td></tr>
<tr class="separator:aac4c939875fb240528435d486b484a7f"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac0ce66b1335330efc625c2b93ca7178a"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="Connection_8h.html#ac0ce66b1335330efc625c2b93ca7178a">Connection_beginTransaction</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> C)</td></tr>
<tr class="memdesc:ac0ce66b1335330efc625c2b93ca7178a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Start a transaction.  <a href="#ac0ce66b1335330efc625c2b93ca7178a">More...</a><br/></td></tr>
<tr class="separator:ac0ce66b1335330efc625c2b93ca7178a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ac3672ae2a12da6901e53702decb10139"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="Connection_8h.html#ac3672ae2a12da6901e53702decb10139">Connection_commit</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> C)</td></tr>
<tr class="memdesc:ac3672ae2a12da6901e53702decb10139"><td class="mdescLeft">&#160;</td><td class="mdescRight">Makes all changes made since the previous commit/rollback permanent and releases any database locks currently held by this Connection object.  <a href="#ac3672ae2a12da6901e53702decb10139">More...</a><br/></td></tr>
<tr class="separator:ac3672ae2a12da6901e53702decb10139"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a4bdab7bb14c43834ba231aa511919a79"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="Connection_8h.html#a4bdab7bb14c43834ba231aa511919a79">Connection_rollback</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> C)</td></tr>
<tr class="memdesc:a4bdab7bb14c43834ba231aa511919a79"><td class="mdescLeft">&#160;</td><td class="mdescRight">Undoes all changes made in the current transaction and releases any database locks currently held by this Connection object.  <a href="#a4bdab7bb14c43834ba231aa511919a79">More...</a><br/></td></tr>
<tr class="separator:a4bdab7bb14c43834ba231aa511919a79"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a784a1c368a3b88f93323ceaa2675346a"><td class="memItemLeft" align="right" valign="top">long long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="Connection_8h.html#a784a1c368a3b88f93323ceaa2675346a">Connection_lastRowId</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> C)</td></tr>
<tr class="memdesc:a784a1c368a3b88f93323ceaa2675346a"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the value for the most recent INSERT statement into a table with an AUTO_INCREMENT or INTEGER PRIMARY KEY column.  <a href="#a784a1c368a3b88f93323ceaa2675346a">More...</a><br/></td></tr>
<tr class="separator:a784a1c368a3b88f93323ceaa2675346a"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a7a1727da9b90633faacac82efd93e0cc"><td class="memItemLeft" align="right" valign="top">long long&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="Connection_8h.html#a7a1727da9b90633faacac82efd93e0cc">Connection_rowsChanged</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> C)</td></tr>
<tr class="memdesc:a7a1727da9b90633faacac82efd93e0cc"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns the number of rows that was inserted, deleted or modified by the last <a class="el" href="Connection_8h.html#ad7029336959701d33bb921b89bc5b7ef" title="Executes the given SQL statement, which may be an INSERT, UPDATE, or DELETE statement or an SQL state...">Connection_execute()</a> statement.  <a href="#a7a1727da9b90633faacac82efd93e0cc">More...</a><br/></td></tr>
<tr class="separator:a7a1727da9b90633faacac82efd93e0cc"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad7029336959701d33bb921b89bc5b7ef"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="Connection_8h.html#ad7029336959701d33bb921b89bc5b7ef">Connection_execute</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> C, const char *sql,...)</td></tr>
<tr class="memdesc:ad7029336959701d33bb921b89bc5b7ef"><td class="mdescLeft">&#160;</td><td class="mdescRight">Executes the given SQL statement, which may be an INSERT, UPDATE, or DELETE statement or an SQL statement that returns nothing, such as an SQL DDL statement.  <a href="#ad7029336959701d33bb921b89bc5b7ef">More...</a><br/></td></tr>
<tr class="separator:ad7029336959701d33bb921b89bc5b7ef"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3d1e39204654573ccac3d8ba3a2eae58"><td class="memItemLeft" align="right" valign="top">ResultSet_T&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="Connection_8h.html#a3d1e39204654573ccac3d8ba3a2eae58">Connection_executeQuery</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> C, const char *sql,...)</td></tr>
<tr class="memdesc:a3d1e39204654573ccac3d8ba3a2eae58"><td class="mdescLeft">&#160;</td><td class="mdescRight">Executes the given SQL statement, which returns a single ResultSet object.  <a href="#a3d1e39204654573ccac3d8ba3a2eae58">More...</a><br/></td></tr>
<tr class="separator:a3d1e39204654573ccac3d8ba3a2eae58"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a16dfbbe273d9a872462bed182dec3bb5"><td class="memItemLeft" align="right" valign="top">PreparedStatement_T&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="Connection_8h.html#a16dfbbe273d9a872462bed182dec3bb5">Connection_prepareStatement</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> C, const char *sql,...)</td></tr>
<tr class="memdesc:a16dfbbe273d9a872462bed182dec3bb5"><td class="mdescLeft">&#160;</td><td class="mdescRight">Creates a PreparedStatement object for sending parameterized SQL statements to the database.  <a href="#a16dfbbe273d9a872462bed182dec3bb5">More...</a><br/></td></tr>
<tr class="separator:a16dfbbe273d9a872462bed182dec3bb5"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:af5287b68722604015d3e7f82b0b139ee"><td class="memItemLeft" align="right" valign="top">const char *&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="Connection_8h.html#af5287b68722604015d3e7f82b0b139ee">Connection_getLastError</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> C)</td></tr>
<tr class="memdesc:af5287b68722604015d3e7f82b0b139ee"><td class="mdescLeft">&#160;</td><td class="mdescRight">This method can be used to obtain a string describing the last error that occurred.  <a href="#af5287b68722604015d3e7f82b0b139ee">More...</a><br/></td></tr>
<tr class="separator:af5287b68722604015d3e7f82b0b139ee"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader">Properties</div></td></tr>
<tr class="memitem:a94361c8781129aaeb809a65b66f92608"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="Connection_8h.html#a94361c8781129aaeb809a65b66f92608">Connection_setQueryTimeout</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> C, int ms)</td></tr>
<tr class="memdesc:a94361c8781129aaeb809a65b66f92608"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the number of milliseconds the Connection should wait for a SQL statement to finish if the database is busy.  <a href="#a94361c8781129aaeb809a65b66f92608">More...</a><br/></td></tr>
<tr class="separator:a94361c8781129aaeb809a65b66f92608"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a3c8570c9bd969efe7f91c516ce0d76f9"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="Connection_8h.html#a3c8570c9bd969efe7f91c516ce0d76f9">Connection_getQueryTimeout</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> C)</td></tr>
<tr class="memdesc:a3c8570c9bd969efe7f91c516ce0d76f9"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieves the number of milliseconds the Connection will wait for a SQL statement object to execute.  <a href="#a3c8570c9bd969efe7f91c516ce0d76f9">More...</a><br/></td></tr>
<tr class="separator:a3c8570c9bd969efe7f91c516ce0d76f9"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a1e4b15139c4cd0917ad028284c1b0bc2"><td class="memItemLeft" align="right" valign="top">void&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="Connection_8h.html#a1e4b15139c4cd0917ad028284c1b0bc2">Connection_setMaxRows</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> C, int max)</td></tr>
<tr class="memdesc:a1e4b15139c4cd0917ad028284c1b0bc2"><td class="mdescLeft">&#160;</td><td class="mdescRight">Sets the limit for the maximum number of rows that any ResultSet object can contain.  <a href="#a1e4b15139c4cd0917ad028284c1b0bc2">More...</a><br/></td></tr>
<tr class="separator:a1e4b15139c4cd0917ad028284c1b0bc2"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:a2686525f6d3374631f4385e03708088d"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="Connection_8h.html#a2686525f6d3374631f4385e03708088d">Connection_getMaxRows</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> C)</td></tr>
<tr class="memdesc:a2686525f6d3374631f4385e03708088d"><td class="mdescLeft">&#160;</td><td class="mdescRight">Retrieves the maximum number of rows that a ResultSet object produced by this Connection object can contain.  <a href="#a2686525f6d3374631f4385e03708088d">More...</a><br/></td></tr>
<tr class="separator:a2686525f6d3374631f4385e03708088d"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr class="memitem:ad4823fe7dfe946573919138f6d708f9e"><td class="memItemLeft" align="right" valign="top">URL_T&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="Connection_8h.html#ad4823fe7dfe946573919138f6d708f9e">Connection_getURL</a> (<a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a> C)</td></tr>
<tr class="memdesc:ad4823fe7dfe946573919138f6d708f9e"><td class="mdescLeft">&#160;</td><td class="mdescRight">Returns this Connection URL.  <a href="#ad4823fe7dfe946573919138f6d708f9e">More...</a><br/></td></tr>
<tr class="separator:ad4823fe7dfe946573919138f6d708f9e"><td class="memSeparator" colspan="2">&#160;</td></tr>
<tr><td colspan="2"><div class="groupHeader">Class methods</div></td></tr>
<tr class="memitem:a518c866ed09a2520fd43d153bebc2e8d"><td class="memItemLeft" align="right" valign="top">int&#160;</td><td class="memItemRight" valign="bottom"><a class="el" href="Connection_8h.html#a518c866ed09a2520fd43d153bebc2e8d">Connection_isSupported</a> (const char *url)</td></tr>
<tr class="memdesc:a518c866ed09a2520fd43d153bebc2e8d"><td class="mdescLeft">&#160;</td><td class="mdescRight"><b>Class method</b>, test if the specified database system is supported by this library.  <a href="#a518c866ed09a2520fd43d153bebc2e8d">More...</a><br/></td></tr>
<tr class="separator:a518c866ed09a2520fd43d153bebc2e8d"><td class="memSeparator" colspan="2">&#160;</td></tr>
</table>
<h2 class="groupheader">Macro Definition Documentation</h2>
<a class="anchor" id="a0acb682b8260ab1c60b918599864e2e5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">#define <a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a>&#160;&#160;&#160;Connection_T</td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<h2 class="groupheader">Typedef Documentation</h2>
<a class="anchor" id="a8dc1b239f8e305fbd1406ff041c89151"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">typedef struct Connection_S* <a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a></td>
        </tr>
      </table>
</div><div class="memdoc">

</div>
</div>
<h2 class="groupheader">Function Documentation</h2>
<a class="anchor" id="a94361c8781129aaeb809a65b66f92608"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Connection_setQueryTimeout </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a>&#160;</td>
          <td class="paramname"><em>C</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>ms</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets the number of milliseconds the Connection should wait for a SQL statement to finish if the database is busy. </p>
<p>If the limit is exceeded, then the <code>execute</code> methods will return immediately with an error. The default timeout is <code>3 seconds</code>. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">C</td><td>A Connection object </td></tr>
    <tr><td class="paramname">ms</td><td>The query timeout limit in milliseconds; zero means there is no limit </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a3c8570c9bd969efe7f91c516ce0d76f9"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int Connection_getQueryTimeout </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a>&#160;</td>
          <td class="paramname"><em>C</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Retrieves the number of milliseconds the Connection will wait for a SQL statement object to execute. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">C</td><td>A Connection object </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The query timeout limit in milliseconds; zero means there is no limit </dd></dl>

</div>
</div>
<a class="anchor" id="a1e4b15139c4cd0917ad028284c1b0bc2"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Connection_setMaxRows </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a>&#160;</td>
          <td class="paramname"><em>C</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">int&#160;</td>
          <td class="paramname"><em>max</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Sets the limit for the maximum number of rows that any ResultSet object can contain. </p>
<p>If the limit is exceeded, the excess rows are silently dropped. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">C</td><td>A Connection object </td></tr>
    <tr><td class="paramname">max</td><td>The new max rows limit; 0 means there is no limit </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="a2686525f6d3374631f4385e03708088d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int Connection_getMaxRows </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a>&#160;</td>
          <td class="paramname"><em>C</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Retrieves the maximum number of rows that a ResultSet object produced by this Connection object can contain. </p>
<p>If this limit is exceeded, the excess rows are silently dropped. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">C</td><td>A Connection object </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The new max rows limit; 0 means there is no limit </dd></dl>

</div>
</div>
<a class="anchor" id="ad4823fe7dfe946573919138f6d708f9e"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">URL_T Connection_getURL </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a>&#160;</td>
          <td class="paramname"><em>C</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns this Connection URL. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">C</td><td>A Connection object </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>This Connection URL </dd></dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="URL_8h.html" title="URL represent an immutable Uniform Resource Locator. ">URL.h</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ac90958295ec1728f6b990d28fe052ac8"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int Connection_ping </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a>&#160;</td>
          <td class="paramname"><em>C</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Ping the database server and returns true if this Connection is alive, otherwise false in which case the Connection should be closed. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">C</td><td>A Connection object </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if Connection is connected to a database server otherwise false </dd></dl>

</div>
</div>
<a class="anchor" id="ae0cd7b68e0e3cfd6a1a458af31db25d3"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Connection_clear </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a>&#160;</td>
          <td class="paramname"><em>C</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Close any ResultSet and PreparedStatements in the Connection. </p>
<p>Normally it is not necessary to call this method, but for some implementation (SQLite) it <em>may, in some situations,</em> be necessary to call this method if a execution sequence error occurs. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">C</td><td>A Connection object </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="aac4c939875fb240528435d486b484a7f"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Connection_close </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a>&#160;</td>
          <td class="paramname"><em>C</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Return connection to the connection pool. </p>
<p>The same as calling <a class="el" href="ConnectionPool_8h.html#a5d1f04dc0ae5fc42707dfd934f681c4a" title="Returns a connection to the pool. ">ConnectionPool_returnConnection()</a> on a connection. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">C</td><td>A Connection object </td></tr>
  </table>
  </dd>
</dl>

</div>
</div>
<a class="anchor" id="ac0ce66b1335330efc625c2b93ca7178a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Connection_beginTransaction </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a>&#160;</td>
          <td class="paramname"><em>C</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Start a transaction. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">C</td><td>A Connection object </td></tr>
  </table>
  </dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">SQLException</td><td>If a database error occurs </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="SQLException_8h.html" title="Signals that an SQL specific exception has occurred. ">SQLException.h</a> </dd></dl>

</div>
</div>
<a class="anchor" id="ac3672ae2a12da6901e53702decb10139"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Connection_commit </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a>&#160;</td>
          <td class="paramname"><em>C</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Makes all changes made since the previous commit/rollback permanent and releases any database locks currently held by this Connection object. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">C</td><td>A Connection object </td></tr>
  </table>
  </dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">SQLException</td><td>If a database error occurs </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="SQLException_8h.html" title="Signals that an SQL specific exception has occurred. ">SQLException.h</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a4bdab7bb14c43834ba231aa511919a79"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Connection_rollback </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a>&#160;</td>
          <td class="paramname"><em>C</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Undoes all changes made in the current transaction and releases any database locks currently held by this Connection object. </p>
<p>This method will first call <a class="el" href="Connection_8h.html#ae0cd7b68e0e3cfd6a1a458af31db25d3" title="Close any ResultSet and PreparedStatements in the Connection. ">Connection_clear()</a> before performing the rollback to clear any statements in progress such as selects. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">C</td><td>A Connection object </td></tr>
  </table>
  </dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">SQLException</td><td>If a database error occurs </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="SQLException_8h.html" title="Signals that an SQL specific exception has occurred. ">SQLException.h</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a784a1c368a3b88f93323ceaa2675346a"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">long long Connection_lastRowId </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a>&#160;</td>
          <td class="paramname"><em>C</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the value for the most recent INSERT statement into a table with an AUTO_INCREMENT or INTEGER PRIMARY KEY column. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">C</td><td>A Connection object </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The value of the rowid from the last insert statement </dd></dl>

</div>
</div>
<a class="anchor" id="a7a1727da9b90633faacac82efd93e0cc"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">long long Connection_rowsChanged </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a>&#160;</td>
          <td class="paramname"><em>C</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Returns the number of rows that was inserted, deleted or modified by the last <a class="el" href="Connection_8h.html#ad7029336959701d33bb921b89bc5b7ef" title="Executes the given SQL statement, which may be an INSERT, UPDATE, or DELETE statement or an SQL state...">Connection_execute()</a> statement. </p>
<p>If used with a transaction, this method should be called <em>before</em> commit is executed, otherwise 0 is returned. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">C</td><td>A Connection object </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>The number of rows changed by the last (DIM) SQL statement </dd></dl>

</div>
</div>
<a class="anchor" id="ad7029336959701d33bb921b89bc5b7ef"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">void Connection_execute </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a>&#160;</td>
          <td class="paramname"><em>C</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>sql</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>...</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Executes the given SQL statement, which may be an INSERT, UPDATE, or DELETE statement or an SQL statement that returns nothing, such as an SQL DDL statement. </p>
<p>Several SQL statements can be used in the sql parameter string, each separated with the <em>;</em> SQL statement separator character. <b>Note</b>, calling this method clears any previous ResultSets associated with the Connection. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">C</td><td>A Connection object </td></tr>
    <tr><td class="paramname">sql</td><td>A SQL statement </td></tr>
  </table>
  </dd>
</dl>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">SQLException</td><td>If a database error occurs. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="SQLException_8h.html" title="Signals that an SQL specific exception has occurred. ">SQLException.h</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a3d1e39204654573ccac3d8ba3a2eae58"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">ResultSet_T Connection_executeQuery </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a>&#160;</td>
          <td class="paramname"><em>C</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>sql</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>...</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Executes the given SQL statement, which returns a single ResultSet object. </p>
<p>You may <b>only</b> use one SQL statement with this method. This is different from the behavior of <a class="el" href="Connection_8h.html#ad7029336959701d33bb921b89bc5b7ef" title="Executes the given SQL statement, which may be an INSERT, UPDATE, or DELETE statement or an SQL state...">Connection_execute()</a> which executes all SQL statements in its input string. If the sql parameter string contains more than one SQL statement, only the first statement is executed, the others are silently ignored. A ResultSet "lives" only until the next call to <a class="el" href="Connection_8h.html#a3d1e39204654573ccac3d8ba3a2eae58" title="Executes the given SQL statement, which returns a single ResultSet object. ">Connection_executeQuery()</a>, <a class="el" href="Connection_8h.html#ad7029336959701d33bb921b89bc5b7ef" title="Executes the given SQL statement, which may be an INSERT, UPDATE, or DELETE statement or an SQL state...">Connection_execute()</a> or until the Connection is returned to the Connection Pool. <em>This means that Result Sets cannot be saved between queries</em>. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">C</td><td>A Connection object </td></tr>
    <tr><td class="paramname">sql</td><td>A SQL statement </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A ResultSet object that contains the data produced by the given query. </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">SQLException</td><td>If a database error occurs. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="ResultSet_8h.html" title="A ResultSet represents a database result set. ">ResultSet.h</a> </dd>
<dd>
<a class="el" href="SQLException_8h.html" title="Signals that an SQL specific exception has occurred. ">SQLException.h</a> </dd></dl>

</div>
</div>
<a class="anchor" id="a16dfbbe273d9a872462bed182dec3bb5"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">PreparedStatement_T Connection_prepareStatement </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a>&#160;</td>
          <td class="paramname"><em>C</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>sql</em>, </td>
        </tr>
        <tr>
          <td class="paramkey"></td>
          <td></td>
          <td class="paramtype">&#160;</td>
          <td class="paramname"><em>...</em>&#160;</td>
        </tr>
        <tr>
          <td></td>
          <td>)</td>
          <td></td><td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>Creates a PreparedStatement object for sending parameterized SQL statements to the database. </p>
<p>The <code>sql</code> parameter may contain IN parameter placeholders. An IN placeholder is specified with a '?' character in the sql string. The placeholders are then replaced with actual values by using the PreparedStatement's setXXX methods. Only <em>one</em> SQL statement may be used in the sql parameter, this in difference to <a class="el" href="Connection_8h.html#ad7029336959701d33bb921b89bc5b7ef" title="Executes the given SQL statement, which may be an INSERT, UPDATE, or DELETE statement or an SQL state...">Connection_execute()</a> which may take several statements. A PreparedStatement "lives" until the Connection is returned to the Connection Pool. </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">C</td><td>A Connection object </td></tr>
    <tr><td class="paramname">sql</td><td>A single SQL statement that may contain one or more '?' IN parameter placeholders </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A new PreparedStatement object containing the pre-compiled SQL statement. </dd></dl>
<dl class="exception"><dt>Exceptions</dt><dd>
  <table class="exception">
    <tr><td class="paramname">SQLException</td><td>If a database error occurs. </td></tr>
  </table>
  </dd>
</dl>
<dl class="section see"><dt>See Also</dt><dd><a class="el" href="PreparedStatement_8h.html" title="A PreparedStatement represent a single SQL statement pre-compiled into byte code for later execution...">PreparedStatement.h</a> </dd>
<dd>
<a class="el" href="SQLException_8h.html" title="Signals that an SQL specific exception has occurred. ">SQLException.h</a> </dd></dl>

</div>
</div>
<a class="anchor" id="af5287b68722604015d3e7f82b0b139ee"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">const char* Connection_getLastError </td>
          <td>(</td>
          <td class="paramtype"><a class="el" href="Connection_8h.html#a8dc1b239f8e305fbd1406ff041c89151">T</a>&#160;</td>
          <td class="paramname"><em>C</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p>This method can be used to obtain a string describing the last error that occurred. </p>
<p>Inside a CATCH-block you can also find the error message directly in the variable Exception_frame.message. It is recommended to use this variable instead since it contains both SQL errors and API errors such as parameter index out of range etc, while <a class="el" href="Connection_8h.html#af5287b68722604015d3e7f82b0b139ee" title="This method can be used to obtain a string describing the last error that occurred. ">Connection_getLastError()</a> might only show SQL errors </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">C</td><td>A Connection object </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>A string explaining the last error </dd></dl>

</div>
</div>
<a class="anchor" id="a518c866ed09a2520fd43d153bebc2e8d"></a>
<div class="memitem">
<div class="memproto">
      <table class="memname">
        <tr>
          <td class="memname">int Connection_isSupported </td>
          <td>(</td>
          <td class="paramtype">const char *&#160;</td>
          <td class="paramname"><em>url</em></td><td>)</td>
          <td></td>
        </tr>
      </table>
</div><div class="memdoc">

<p><b>Class method</b>, test if the specified database system is supported by this library. </p>
<p>Clients may pass a full Connection URL, for example using <a class="el" href="URL_8h.html#a63f81fa482efdabd205cf78e4e98a2dc" title="Returns a string representation of this URL object. ">URL_toString()</a>, or for convenience only the protocol part of the URL. E.g. "mysql" or "sqlite". </p>
<dl class="params"><dt>Parameters</dt><dd>
  <table class="params">
    <tr><td class="paramname">url</td><td>A database url string </td></tr>
  </table>
  </dd>
</dl>
<dl class="section return"><dt>Returns</dt><dd>true if supported otherwise false </dd></dl>

</div>
</div>
</div><!-- contents -->
<p style="text-align:center;color:#808080;font-size:90%;margin:40px 0 20px 0;">
Copyright &copy; <a href="http://tildeslash.com/">Tildeslash Ltd</a>. All
rights reserved.</p>
</body></html>
